package server.main.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import server.main.config.cache.MybatisPlusRedisCache;
import server.main.pojo.RolePermission;

/**
 * @auther MingHsZzz
 * @Date 2022/10/5  10:15
 * @project main
 * @description
 */

@Mapper
@CacheNamespace(implementation = MybatisPlusRedisCache.class)

public interface RolePermissionMapper extends BaseMapper<RolePermission> {



    @Delete("DELETE FROM role_permission WHERE permission_id = #{permissionid} AND role_id = #{roleid}")
    public void delete(Integer roleid,Integer permissionid);





    @Delete("DELETE FROM role_permission WHERE role_permission.role_id = #{roleid}")
    public void deleterole(String roleid);

}
